// Known p, q, e, c solve plaintext


let p= "9648423029010515676590551740010426534945737639235739800643989352039852507298491399561035009163427050370107570733633350911691280297777160200625281665378483";

let q= "11874843837980297032092405848653656852760910154543380907650040190704283358909208578251063047732443992230647903887510065547947313543299303261986053486569407";

let e= "65537";

let c = "83208298995174604174773590298203639360540024871256126892889661345742403314929861939100492666605647316646576486526217457006376842280869728581726746401583705899941768214138742259689334840735633553053887641847651173776251820293087212885670180367406807406765923638973161375817392737747832762751690104423869019034";

let n = bignum_mul(p,q);
print("n: "+n+"\n");

let phi_n = bignum_mul(bignum_sub(p, "1"), bignum_sub(q, "1"));
print("phi_n: "+phi_n+"\n");

let d = bignum_invert(e, phi_n);
print("d: "+phi_n+"\n");

let m = bignum_powm(c, d, n);
print("m: "+m+"\n");

let plain_text = bignum_convert_string(m);
print("plain_text: "+plain_text+"\n");
